<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./../public/templateOK.xhtml">

            <ui:define name="detalhes">

                <script type="text/javascript">

                    shortcut.add("f10", function()
                    {
                        document.getElementById('geral:btnSalvar').click()
                    });
                    shortcut.add("Insert", function()
                    {
                        document.getElementById('geral:btnNovo').click()
                    });
                    shortcut.add("Esc", function()
                    {
                        document.getElementById('geral:btnVoltar').click()
                    });
                </script>



                <p:panel header="#{compositorBean.titulo}">

                    <h:panelGroup id="pnlProcesso">

                        <h:panelGroup id="lista" rendered='#{compositorBean.renderLista == "0"}'> 
                            <ui:include src="listarCompositor.xhtml"/>
                        </h:panelGroup>

                        <h:panelGroup id="formulario" rendered='#{compositorBean.renderLista == "1"}'>

                            <ui:include src="cadastroCompositor.xhtml" />
                        </h:panelGroup>
                        
                        <h:panelGroup id="excluir" rendered='#{compositorBean.renderLista == "2"}'>

                            <ui:include src="excluir.xhtml" />
                        </h:panelGroup>

                    </h:panelGroup>

                </p:panel>
            </ui:define>

        </ui:composition>

    </body>
</html>
